let energyurls = {
  'roles': '',
  'login': '',
  'Eelec': ''
}

var baseUrl
if (typeof location.origin === 'undefined') {
  baseUrl = location.protocol + '//' + location.host
} else {
  baseUrl = window.location.origin
}



// 开发环境
if (baseUrl.includes("energy") && baseUrl.includes("dev")) {
  // energyurls.roles='http://provider-web-fnw-dev.topaas.enncloud.cn'
  energyurls.login = 'http://uac-fnw-dev.topaas.enncloud.cn'
  energyurls.Eelec = 'http://energy-consumer-web-fnw-dev.topaas.enncloud.cn'
  energyurls.logout = 'http://www.dev.tipaas.enncloud.cn'
  // 测试环境
} else if (baseUrl.includes("energy") && baseUrl.includes("test")) {
  // energyurls.roles='http://provider-web-fnw-test.topaas.enncloud.cn'
  energyurls.login = 'http://uac-fnw-test.topaas.enncloud.cn'
  energyurls.Eelec = 'http://energy-consumer-web-fnw-test.topaas.enncloud.cn'
  energyurls.logout = 'http://www.test.tipaas.enncloud.cn'
  // 预生产环境
} else if (baseUrl.includes("energy") && baseUrl.includes("pro")) {
  // energyurls.roles='http://provider-web-fnw-prod.pro.fanneng.com'
  // energyurls.roles='http://provider-web-fnw-prod.topaas.enncloud.cn'
  energyurls.login = 'http://uac-fnw-prod.pro.fanneng.com'
  energyurls.Eelec = 'http://energy-consumer-web-fnw-prod.topaas.enncloud.cn'
  energyurls.logout = 'http://www.pro.fanneng.com'
  // 生产环境
} else if (baseUrl.includes("prosumer")) {
  // energyurls.roles='http://api.fanneng.com/boss/web'
  energyurls.login = 'https://uac.enncloud.cn'
  energyurls.Eelec = 'http://api.fanneng.com/energy-consumer-web'
  energyurls.logout = 'http://www.fanneng.com'
} else {
  // energyurls.roles='http://provider-web-fnw-dev.topaas.enncloud.cn'
  // energyurls.login = 'http://uac-fnw-dev.topaas.enncloud.cn'
  // energyurls.Eelec = 'http://energy-consumer-web-fnw-dev.topaas.enncloud.cn'
  // energyurls.logout = 'http://www.dev.tipaas.enncloud.cn'

  energyurls.login = 'http://uac-fnw-test.topaas.enncloud.cn'
  energyurls.Eelec = 'http://energy-consumer-web-fnw-test.topaas.enncloud.cn'
  energyurls.logout = 'http://www.test.tipaas.enncloud.cn'



}

export default energyurls